<?php
$likeClassCourses = peoplelikedClassCourse();

?>
<section class="people-like">
    <div class="container">
        <div class="row">
            <div class="col-lg-12 column12 classes-padl classes-padr">
                <div class="people-head clearfix">
                    <h4 class="pull-left" style="display: inline-block;margin-left:22px;">People who liked this also liked</h4><a href="">See all</a>
                    
                </div>
                <div id="owl-people1" class="owl-carousel owl-theme">
                    <?php
                    if (!empty($likeClassCourses)) {
                        $emptyImage = '<img src="' . getWorkNoshopimage(SkillConfig::skill_literallyending_like_classe_slider) . '" class="img-responsive">';
                        foreach ($likeClassCourses as $likeClassCourses) {
                           
                            if (!empty($likeClassCourses->classes_id)) {
                                $classId = $likeClassCourses->classes_id;
                                $imageName = ClassImage::getPrimaryImage($classId);
                                $className = $likeClassCourses->classes->class_titile;
                                 $seourl = $likeClassCourses->classes->class_seo_title;
                                $userDetails = getUserTypeByClassCourse('Classes', $likeClassCourses->classes_id);
                                $imagePath = getImagePathByClassCourse('Classes', $likeClassCourses->classes_id);
                                $url = $this->createAbsoluteUrl('/workshop-'.$classId.'/'.$seourl);
                            } else {
                                $classId = $likeClassCourses->courses_id;
                                $imageName = ClassImage::getCoursesPrimaryImage($classId);
                                 $seourl = $likeClassCourses->courses->course_seo_title;
                                $url = $this->createAbsoluteUrl('/courses-'.$likeClassCourses->courses_id.'/'.$seourl);
                                $className = $likeClassCourses->courses->course_titile;
                                $userDetails = getUserTypeByClassCourse('Courses', $likeClassCourses->courses_id);
                                $imagePath = getImagePathByClassCourse('Courses', $likeClassCourses->courses_id);
                            }
                            ?>
                            <div class="single-people">
                                <a href="<?php echo $url; ?>">

                                    <?php echo (!empty($imageName)) ? '<img src="' . getRequestbaseUrl() . getuploadFolderDir() . SkillConfig::getClassCourseImagePath($imagePath) . '240X180/' . $imageName . '" class="img-responsive" alt="' . $className . '">' : $emptyImage; ?></a>
                                <span><?php echo substrclasscourname($className); ?><small>By <?php echo substr($userDetails->first_name . '  ' . $userDetails->last_name, 0, 30); ?></small></span>

                                </a>
                            </div><!--single people end here-->
                            <?php
                        }
                    }
                    ?>
                </div><!--===slider end here-->
                <div class="gap"></div>
                <div class="customNavigation hidden-xs">
                    <a class="prev3">Previous</a>
                    <a class="next3">Next</a>
                </div><!--custom navigation-->
            </div><!--col-->
        </div><!--row-->
    </div><!--container-->
</section><!--people like ends here-->  
<div class="clearfix"></div>